package com.jichaoyun.sys.controller;

import com.jichaoyun.common.model.Result;
import com.jichaoyun.model.entity.Menu;
import com.jichaoyun.sys.service.IMenuService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhenzhang
 */
@RestController
@Api(tags = {"App菜单管理接口列表"})
@RequestMapping("/sys/menu")
public class MenuController {
    @Autowired
    private IMenuService menuService;

    @ApiOperation("查询菜单列表")
    @GetMapping("/getMenulist")
    public Result<List<Menu>> getAllMenu(){
        List<Menu> allMenu = menuService.getAllMenu();
        return Result.success(allMenu);
    }


}
